# !/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :conftest.py
# @Time      :2025/2/17 19:52:02
# @Author    :flower


import pytest

from business.common_business import CommonBusiness
from util.get_log import logger


@pytest.fixture(scope='class')
def create_project_save():
    logger.info(f'============================= 用例执行前置【创建项目】 =============================')
    response_cp = CommonBusiness().create_project()
    project_id = response_cp['data']['id']
    root_id = response_cp['data']['rootId']
    logger.info(f'============================= 用例执行...... =============================')
    yield project_id, root_id
    logger.info(f'============================= 用例执行后置【保存项目】 =============================')
    CommonBusiness().save_project(project_id)

